package com.apobates.jforum.grief.aurl.utils;

import java.util.Objects;
import java.util.function.Function;

/**
 * 三个参数的映射函数
 * @param <T>
 * @param <U>
 * @param <V>
 * @param <R>
 */
@FunctionalInterface
public interface TriFunction<T,U,V,R> {
    R apply(T t, U u, V v);

    default <W> TriFunction<T,U,V,W> andThen(Function<? super R,? extends W> after){
        Objects.requireNonNull(after);
        return (T t, U u, V v) -> after.apply(apply(t, u, v));
    }
}
